package com.yxw.live_vod_backend_boot.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yxw.yxnet_cd_center.common.dto.BaseDTO;
import com.yxw.live_vod_backend_boot.dto.UserLoginDTO;
import com.yxw.live_vod_backend_boot.dto.UserPhoneLoginDTO;
import com.yxw.live_vod_backend_boot.dto.UserSendCodeDTO;
import com.yxw.live_vod_backend_boot.entity.YxCsUserEntity;
import com.yxw.live_vod_backend_boot.vo.LoginUserVo;

import javax.servlet.http.HttpServletRequest;

/**
 * 登录相关接口
 * @author liuxin
 * @date 2023.10.25
 */
public interface LoginService extends IService<YxCsUserEntity> {

    /**
     * 登出
     * @param baseDTO
     */
    void logout(BaseDTO baseDTO);

    /**
     * 账号密码登录
     * @param userLoginDTO
     * @return
     */
    LoginUserVo login(UserLoginDTO userLoginDTO) throws Exception;

    /**
     * 手机号短信验证码登录
     * @param userPhoneLoginDTO 参数封装
     * @return LoginUserVo
     */
    LoginUserVo phone(UserPhoneLoginDTO userPhoneLoginDTO);

    /**
     * 手机号验证码获取
     * @param userSendCodeDTO
     */
    void send(UserSendCodeDTO userSendCodeDTO);

    /**
     * 刷新token接口
     * @param request
     * @return
     */
    LoginUserVo refreshToken(HttpServletRequest request);
}
